package com.sansi.bleFloodlight.utils;

import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.drawable.GradientDrawable;
import android.view.View;

import com.sansi.bleFloodlight.R;


public class DrawableUtils {

    @SuppressLint("WrongConstant")
    public static void getGradientDrawable(View view, int colors[], Context context) {
        int spacingInPixels = context.getResources().getDimensionPixelSize(R.dimen.dp_10);
        GradientDrawable gd = new GradientDrawable();
        gd.setColor(colors[1]);
        gd.setCornerRadius(spacingInPixels);
        gd.setGradientType(GradientDrawable.RECTANGLE);
        view.setBackground(gd);
    }
}
